.sq-button {
  line-height: 1;
  padding: 0;
  font-family: "PingFang SC", "Microsoft Yahei", sans-serif;
  display: inline-block;
  cursor: pointer;
  box-sizing: border-box;
  background-color: #fff;
  border: 1px solid #dcdfe6;
  white-space: nowrap;
  color: #606266;
  transition: 0.1s;
  // 禁止文字被选中
  -moz-user-select: none;
  /*火狐*/
  -webkit-user-select: none;
  /*webkit浏览器*/
  -ms-user-select: none;
  /*IE10*/
  -khtml-user-select: none;
  /*早期浏览器*/
  user-select: none;
  position: relative;

  &:hover {

    // 提示tooltip
    .tooltip {
      position: absolute;
      display: inline-block;
      padding: 6px;
      top: -102%;
      left: 7%;
      border: 1px solid #ccc;
      background-color: #dcdfe6;
      color: black;

      .triangle {
        position: absolute;
        width: 0px;
        height: 0px;
        // background-color: #dcdfe6;
        display: inline-block;
        top: 100%;
        left: 25%;
        border-top: 10px solid #dcdfe6;
        border-bottom: 10px solid transparent;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
      }
    }
  }

  &:hover,
  &:focus {
    color: #3b82f6;
    border-color: #3b82f6;
    background-color: #e0e7ff;
  }

  // 按钮虚线
  &.is-dash {
    border: 1px dashed #ccc;
  }

  // 朴素按钮
  &.is-plain:hover,
  &.is-plain:focus {
    background: #fff;
    border-color: #6366f1;
    color: #6366f1;
  }

  // 圆角按钮
  &.is-round {
    border-radius: 20px;
  }

  // 圆形按钮
  &.is-circle {
    min-width: 50px;
    min-height: 50px;
    width: auto;
    height: auto;
    border-radius: 50%;
    padding: 15px 5px;
  }

  // 让图标和文字之间空开
  & [class*="fa-"]+span {
    margin-left: 5px;
  }

  // 禁用
  &.is-disabled {
    cursor: not-allowed;
    background-image: none;
    background-color: #fff;
    color: #afb1b3;
    font-weight: bold;
    border: 4px solid #afb1b3;

    &:hover,
    &:focus {
      background: #fff;
      border-color: #afb1b3;
      color: #afb1b3;
    }
  }
}



// type
.sq-button--primary {
  color: #fff;
  background-color: #6366f1;
  border-color: #6366f1;

  // box-shadow: inset 3px 6px 10px #337ecc, inset -3px -7px 10px #4dbeff;
  &:hover,
  &:focus {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
  }

  &.is-plain {
    color: #6366f1;
    background: #e0e3f1;

    &:hover,
    &:focus {
      background: #6366f1;
      border-color: #6366f1;
      color: #fff;
    }
  }
}

.sq-button--success {
  color: #fff;
  background-color: #34d399;
  border-color: #34d399;

  &:hover,
  &:focus {
    background-color: #10b981;
    border-color: #10b981;
    color: #fff;
  }

  &.is-plain {
    color: #10b981;
    background: #d1fae5;

    &:hover,
    &:focus {
      background: #34d399;
      border-color: #34d399;
      color: #fff;
    }
  }
}

.sq-button--info {
  color: #fff;
  background-color: #9ca3af;
  border-color: #9ca3af;

  &:hover,
  &:focus {
    background-color: #6b7280;
    border-color: #6b7280;
    color: #fff;
  }

  &.is-plain {
    color: #9ca3af;
    background: hsl(240, 4%, 85%);
    ;

    &:hover,
    &:focus {
      background: #9ca3af;
      border-color: #9ca3af;
      color: #fff;
    }
  }
}

.sq-button--warning {
  color: #fff;
  background-color: #f6aa38;
  border-color: #f6aa38;

  &:hover,
  &:focus {
    background-color: #f89b10;
    border-color: #f89b10;
    color: #fff;
  }

  &.is-plain {
    color: #f89b10;
    background: #f8e390;

    &:hover,
    &:focus {
      background: #f6aa38;
      border-color: #f6aa38;
      color: #fff;
    }
  }
}

.sq-button--danger {
  color: #fff;
  background-color: #f87171;
  border-color: #f87171;

  &:hover,
  &:focus {
    background-color: #ef4444;
    border-color: #ef4444;
    color: #fff;
  }

  &.is-plain {
    color: #ef4444;
    background: #fecaca;

    &:hover,
    &:focus {
      background: #f87171;
      border-color: #f87171;
      color: #fff;
    }
  }
}

// size
.sq-button--normal {
  width: 120px;
  height: 40px;
  font-size: 16px;
  border-radius: 4px;
}

.sq-button--large {
  width: 160px;
  height: 50px;
  font-size: 20px;
  border-radius: 5px;
}

.sq-button--small {
  width: 100px;
  height: 35px;
  font-size: 14px;
  border-radius: 4px;
}

.sq-button--mini {
  width: 80px;
  height: 30px;
  font-size: 12px;
  border-radius: 4px;
}